 %include header libraryName=libraryName
 %barcodeURL = 'http://www.barcodesinc.com/generator/image.php?code=%09d&style=197&type=C128B&width=200&height=50&xres=1&font=3' % int(data.get('id'))
    <script type="text/javascript">
        //<!--
        $(document).ready(function() {
            $('#title').focus();
        })
        //-->
    </script>
    <div>Manage Resource</div>
    
    <div class="bordered">
        <form method="post" action="/administration/updateResource/{{data.get('isbn')}}">
            <div>
                <!--<div class="right"><img src="{{barcodeURL}}" alt="resource barcode" /></div>-->
                <input type="hidden" name="id" value="{{data.get('id')}}" />
                <label>ISBN: {{data.get('isbn')}}</label>
                <label for="title">Title: <input class="title" id="title" name="title" type="text" value="{{data.get('title', '').encode('utf-8')}}" /></label>
                <label for="resource_type_id">
                    Resource Type:
                    <select name="resource_type_id">
                        %for type in resourceTypes:
                        <option value="{{type.get('id')}}" {{'selected="selected"' if type.get('id') == data.get('resource_type_id') else ''}}>{{type.get('description').encode('utf-8')}}</option>
                        %end
                    </select>
                </label>
            </div>
            <div>
                <label for="author">Author: <input class="author" name="author" type="text" value="{{data.get('author', '').encode('utf-8')}}" /></label>
                <label for="publisher">Publisher: <input class="publisher" name="publisher" type="text" value="{{data.get('publisher', '').encode('utf-8')}}" /></label>
            </div>
            <div>
                <label for="summary">Summary: <textarea cols="40" rows="7" name="summary">{{data.get('summary', '').encode('utf-8')}}</textarea></label>
            </div>
            <div>
                <a href="/administration/manageResources"><button>Cancel</button></a>
                <button type="submit">Save</button
            </div>
        </form>
        <div><a href="/logout">Logout</a></div>
    </div>
%include footer